/*************************************************************************
	> File Name: test5.cc
	> Author: H.M. Lau
	> Mail: hm.lau@outlook.com
	> Created Time: 2023/09/19 19:50
 ************************************************************************/

#include <iostream>
#include <signal.h>

void catchSig(int  signum)
{
    std::cout << "Get a signal:" << signum << std::endl; 
}

int main(int argc, char *argv[])
{
    for (int sig = 1; sig <= 31; sig++) {
        signal(sig, catchSig);
    }
    while (1) {
        sleep(1);
    }
    return 0;
}
